import { request } from '@pkg/request/src';
export enum Api {
  page = '/system/device/page',
  list = '/system/device/list',
  get = '/system/device/get',
  add = '/system/device/save',
  update = '/system/device/update',
  remove = '/system/device/remove',
  companyList = '/company/list',
}


export const add = (params) => {
  return request.post({url: Api.add, params: params}, {errorMessageMode: 'none'});
}

export const update = (params) =>
  request.post({url: Api.update, params: params}, {errorMessageMode: 'none'});

export const remove = (ids: string) =>
  request.post({url: Api.remove, params: {ids: ids}}, {errorMessageMode: 'none'});

export const companyList = (params) =>
  request.get(
    { url: Api.companyList, params },
    {
      errorMessageMode: 'none',
      successMessageMode: 'none',
    },
  );
